<template>
  <demoBlock title="使用插槽">
    <vcu-nav-bar
      title="标题"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    >
      <template #right>
        <vcu-icon name="search" size="18" />
      </template>
    </vcu-nav-bar>
  </demoBlock>
</template>

<script>
import { defineComponent, ref } from "vue";

export default defineComponent({
  setup() {
    const onClickLeft = () => console.info("返回");
    const onClickRight = () => console.info("按钮");
    return {
      onClickLeft,
      onClickRight,
    };
  },
});
</script>
